﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SKBKontur.Cassandra.Logging.Helpers
{
    class SplitAndJoin
    {
        public static void GetCF(string str, out string cfEvent, out string cfException)
        {
            string[] s = str.Split(':');
            cfEvent = s[0];
            cfException = s.Length > 1 ? s[1] : null;
        }

        public static byte[] SetCF(object obj, string EventCF, string ObjectCF)
        {
            return Encoding.UTF8.GetBytes((obj != null) ? EventCF + ":" + ObjectCF : EventCF);
        }
    }
}
